<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>添加</title>
</head>
	<base href="<?php echo base_url().'views/style/'; ?>" />
	<link href="./css/media.css" rel="stylesheet">
	<link href="./css/seller_center.css" rel="stylesheet">
	<script src="./js/jquery-1.8.2.min.js"></script>
	<script src="./js/myconfirm.js"></script>
	<script src="./js/media.js"></script>
	<script src="./js/copy.js"></script>
	<script src="./js/validate.js"></script>

    <script type="text/javascript" src="<?php echo base_url().'../' ?>org/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" src="<?php echo base_url().'../' ?>org/ueditor/ueditor.all.min.js"></script>
	<script type="text/javascript">
		window.UEDITOR_HOME_URL = "<?php echo base_url() ?>org/ueditor/";
		window.onload = function(){
			window.UEDITOR_CONFIG.initialFrameWidth = 900;
			window.UEDITOR_CONFIG.initialFrameHeight = 400;
			UE.getEditor('content', {autoHeightEnabled: false});
        }
	</script>
    <style>
     table.table1 tr th{
     	text-align: center;
     	vertical-align: top;
     }
     .ncsc-picture-list {
     	margin: 0 0;
     }
    </style>
<body>
	<div class="wrap">
	   <div class="menu_list">
	    <ul>
		  <li><a href="<?php echo site_url('people/people_list').'/?ace='.rand(100000,999999); ?>"> 内容列表 </a></li>
		  <li><a href="javascript:;" class='action'>新增</a></li> 
		</ul> 
	   </div>
	   <form action="<?php echo site_url('people/people_add'); ?>" method="post"    enctype="multipart/form-data">
		   	<table class="table1 hd-form">

		   	  <tr>
		   	    <th class='w100'>姓名</th>
		   		<td>
		   		   <input type="text" name="pe_name" value="" style="width:286px;"/>
		   		</td>
		   	 </tr>

		   	  <tr>
		   	     <th class='w100'>所属分类</th>
		   	 	<td>

		   	 	<select name="c_id" class="w300">
		   	 	    <?php foreach ($peop_cates as $k => $v): ?>
		   	 	        <?php if(empty($v['data'])): ?>
			   	 	    	<option value="<?php echo $v['cid'] ?>">
			   	 	    	   <?php echo $v['catname'];?>
			   	 	    	</option>
		   	 	    	<?php else: ?>
		   	 	    		<option value="<?php echo $v['cid'] ?>" disabled>
		   	 	    		   <?php echo $v['catname'];?>
		   	 	    		</option>
		   	 	    		<?php foreach ($v['data'] as $ke => $va): ?>
		   	 	    			<option value="<?php echo $va['cid'] ?>">
		   	 	    			   <?php echo '---'.$va['catname'];?>
		   	 	    			</option>
		   	 	    		<?php endforeach ?>
		   	 	    	<?php endif;?>
		   	 	    <?php endforeach ?>
		   	 	</select>
		   	 	</td>
		   	  </tr>

		   	   <tr>
		   	      <th class='w100'>第二称谓</th>
		   	  	<td>
		   	  	<?php foreach ($titles as $k=> $v): ?>
		   	  	  <label> <input type="radio" name="pe_sec_title" <?php if($k==1){ ?> checked<?php } ?>  value="<?php echo $v['jt_title']; ?>"/><?php echo $v['jt_title']; ?> </label>		   			
		   	  	<?php endforeach ?>
		   	  	</td>
		   	   </tr> 	  

		   	<tr>
		   	       <th class='w100'>职务</th>
		   	   	<td>
		   	   		<input type="text" name="pe_duty" value="" style="width:286px;"/>
		   	   	</td>
		   	</tr>
		   	 <tr>
		   	    <th class='w100'>学历</th>
		   		<td>
		   			<input type="text" name="pe_degrees" value="" style="width:286px;"/>
		   		</td>
		   	 </tr>  

		   	  <tr>
		   	     <th class='w100'>任期</th>
		   	 	<td>
		   	 		<input type="text" name="pe_term" value="" style="width:286px;"/>
		   	 	</td>
		   	  </tr>

 		   	 <tr>
 		   	    <th class='w60'>标题图片</th>
 		   	    <td>
                     <!-- 上传图片插件 -->
 		   	 	    <div class = 'ad_upload_input'>
 		   	 	      	<input id="catimage" type="text" name="image" readonly onmouseover='view_image(this)' src='' value="" style="width:286px;opacity:0.5" nctype="file_21">
 		   	 	    </div>
 	 	            <div class="ncsc-upload-btn dx_upload_btn">		   	 	           
 	 	              <a href="javascript:void(0);">
 	 	                <span>
 	 	                   <input type="file" hidefocus="true" size="1" class="input-file" name="file_21" id="file_21">
 	 	                </span>
 	 	                <p><i class="icon-upload-alt"></i>上传</p>
 	 	              </a>   
 	 	            </div>   
 	 	            <input type="button" nctype="del" class="ad_upload_del btn2" value="移除"/>  
 		   	    </td>
 		   	</tr>
 		   	 <tr>
 		   	    <th class='w100'>办公室</th>
 		   		<td>
 		   			<input type="text" name="pe_office" value="" style="width:286px;"/>
 		   		</td>
 		   	 </tr>
 		   	  <tr>
 		   	     <th class='w100'>邮箱</th>
 		   	 	<td>
 		   	 		<input type="text" name="pe_email" value="" style="width:286px;"/>
 		   	 	</td>
 		   	  </tr>

	   	        <tr>
	   	  		  <th>内容</th>
	   	  		  <td>
	   	  			<textarea name="pe_content" id="content" style="width:900px;height:400px;"></textarea>
	   	  		  </td>
	   	  	    </tr> 

			<tr>
		   	    <th class='w100'>排序</th>
		   		<td>
		   			<input type="text" name="pe_sort" style='width:288px;' value="255" />
		   		</td>
		   	</tr>  

		   	 <tr>
		   	    <th class='w100' style="text-indent:-9999px;">操作</th>
		   		<td>
		   		    <input type="submit" class="btn1" value=" 确定提交 "/>
		   		</td>
		   	 </tr>
           </table>
	   </form>  
	</div>
	<script src="<?php echo base_url();?>../org/ajaxfileupload/ajaxfileupload.js" ></script>
	<script>
	var target_url = "<?php echo site_url('people/sce_img_upload'); ?>";
	var delete_url = "<?php echo site_url('people/sce_img_del'); ?>";
		$(function(){
		  $("form").validate({
		    pe_name: {
		      rule: {
		        required: true
		    },
		    error: {
		       required: " 姓名不能为空! "
		    },
		    	message: " 请填写姓名",
		    	success: "正确"
		   },
		    pe_degrees: {
		    	message: " 请填写学历",
		    	success: "正确"
		   },
		   pe_term: {
		   		message: " 请填写任期",
		   		success: "正确"
		   },
		   pe_email : {
		   	  rule: {
		   	    email: true
		   	},
		   	error: {
		   	   email: " 邮箱格式不正确! "
		   	},
		   		message: " 请填写邮箱地址",
		   		success: "正确"
		   },
		   pe_duty: {
		    	message: " 请填写职务",
		   		success: "正确"	
			},
			pe_office: {
				message: "请填写具体办公室",
				success: "正确"	
			},
		   lk_sort: {
		      rule: {
		        required: true
		    },
		    error: {
		       required: " 排序不能为空! "
		    },
		    message: " 请输入排序!,默认255,数字越小,优先级越高",
		    success: "正确"
		   }
		 })   
		});
	</script>
</body>
</html>